package com.xhwl.centiotdata.service.cent;


import com.xhwl.common.pojo.ResultJson;
import com.xhwl.common.pojo.cent.sdata.Organization;
import com.xhwl.common.pojo.cent.sdata.OrganizationType;
import com.xhwl.common.query.cent.sdata.OrganizationTypeQuery;
import com.xhwl.common.query.cent.sdata.SpaceQuery;
import feign.Param;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "cent-data-core")
public interface ISpaceCentService {

    /**
     * 获取space信息列表
     */
    @RequestLine(value = "POST /space/list")
    ResultJson list(SpaceQuery spaceQuery);

    /**
     * 获取空间的信息
     */
    @RequestLine(value = "GET /space/detail")
    ResultJson detail(@Param("id") Integer id, @Param("orgId") Integer orgId);

    /**
     * 通过主键id查找 组织
     * @param id
     * @return
     */
    @RequestLine(value = "POST /organization-service/get-by-id")
    Organization getById(@Param("id") Integer id);

    /**
     * 获取组织类型信息
     */
    @RequestLine(value = "POST /organization-type-service/list")
    List<OrganizationType> getOrgTypeList(@Param("organizationTypeQuery") OrganizationTypeQuery organizationTypeQuery);

}
